<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>加密解密工具</title>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
</head>
<body>
    <div class="container">
        <div class="header">
            <a href="index.html" class="back-button">
                <i class="fas fa-arrow-left"></i>
            </a>
            <h2>加密解密工具</h2>
        </div>

        <div class="encrypt-section">
            <select id="algorithm">
                <option value="MD5">MD5</option>
                <option value="SHA1">SHA1</option>
                <option value="SHA256">SHA256</option>
                <option value="SHA512">SHA512</option>
                <option value="BASE64">Base64</option>
                <option value="AES">AES</option>
            </select>

            <div id="keyInput" style="display: none;">
                <div class="input-group">
                    <label>密钥:</label>
                    <input type="text" id="key" placeholder="请输入密钥">
                </div>
            </div>

            <div class="input-group">
                <label>输入文本:</label>
                <textarea id="input" placeholder="请输入要处理的文本..."></textarea>
            </div>

            <div class="button-group">
                <button onclick="encrypt()">加密</button>
                <button onclick="decrypt()" id="decryptBtn" style="display: none;">解密</button>
                <button onclick="copyResult()">复制结果</button>
            </div>

            <div class="result" id="result"></div>
        </div>

        <div id="toast" class="toast">操作成功</div>
    </div>
    <script src="../js/encrypt.js"></script>
</body>
</html> 